home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-11 | 2.2 KB | 74 lines | [TEXT/MPCC] |
- // Quickdraw 3D sample code
- //
- // Nick Thompson, AppleLink: DEVSUPPORT (devsupport@applelink.apple.com)
- //
- // ©1994-5 Apple Computer Inc., All Rights Reserved
-
- #ifndef _MY3DSUPPORT_H_
- #define _MY3DSUPPORT_H_
-
- // Macintosh System Stuff
- #include <Files.h>
- #include <Types.h>
- #include <Windows.h>
-
- // QuickDraw 3D stuff
- #include "QD3D.h"
- #include "QD3DGroup.h"
- #include "QD3DErrors.h"
- #include "QD3DView.h"
- #include "QD3DPick.h"
-
- //-------------------------------------------------------------------------------------------
-
- struct _documentRecord {
- TQ3ViewObject fView ; // the view for the scene
- TQ3GroupObject fModel ; // object in the scene being modelled
- TQ3StyleObject fInterpolation ; // interpolation style used when rendering
- TQ3StyleObject fBackFacing ; // whether to draw shapes that face away from the camera
- TQ3StyleObject fFillStyle ; // whether drawn as solid filled object or decomposed to components
- TQ3Matrix4x4 fRotation; // the transform for the model
- TQ3Point3D fGroupCenter ; // the center of the group (for rotation)
- float fGroupScale ; // scaling factor to apply before drawing
-
- TQ3PickObject fPickObject;
- TQ3StringObject fStringObject;
- char *fName;
-
- TQ3StringObject fDescription;
- char *fDescString;
- Str255 fURL;
-
- float units;
-
- TQ3Boolean launchNetscape;
- };
-
- typedef struct _documentRecord DocumentRec, *DocumentPtr, **DocumentHdl ;
-
- //---------------------------------------------------------------------------------------
-
- OSErr MyQD3DInitialize( void ) ;
- OSErr MyQD3DExit() ;
-
- TQ3ViewObject MyNewView(WindowPtr theWindow) ;
- TQ3DrawContextObject MyNewDrawContext( WindowPtr theWindow) ;
- TQ3CameraObject MyNewCamera(WindowPtr theWindow) ;
- TQ3GroupObject MyNewLights(void) ;
- TQ3GroupObject MyNewModelFromFile(FSSpec *theFileSpec, DocumentPtr theDocument) ;
- TQ3Status SubmitScene( DocumentPtr theDocument ) ;
-
- void AdjustCamera(
- DocumentPtr theDocument,
- short winWidth,
- short winHeight) ;
-
- Boolean MetafileFileSpecify( FSSpec *theFile ) ;
- TQ3Status MyReadModelFromFile( TQ3FileObject theFile,TQ3GroupObject myGroup, DocumentPtr theDocument) ;
-
- void DisplayCustomAttributes(DocumentPtr theDocument);
-
- Boolean OpenURL(char *name);
-
- #endif
-